#if !defined(AFX_LONGTRANS_H__DCD84592_758D_4C2B_87C0_DA9C3AD39803__INCLUDED_)
#define AFX_LONGTRANS_H__DCD84592_758D_4C2B_87C0_DA9C3AD39803__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LongTrans.h : header file
//

#include "ControlInterface.h"
#include "TCPOperate.h"



/////////////////////////////////////////////////////////////////////////////
// CLongTrans thread

class CLongTrans : public CWinThread , public CTCPOperate
{
	DECLARE_DYNCREATE(CLongTrans)
public:
	CLongTrans();           // protected constructor used by dynamic creation
	virtual ~CLongTrans();
// Attributes
public:
	int m_serverSocket;
	BOOL m_Flag;
	BOOL m_serverStatus;
	CString m_serverIP;
	int m_serverPort;

	REQUEST_DEQUE *g_RequetQueue;
	CCriticalSection *g_QueueLock;

	CLog *m_Log;
// Operations
public:
	void ProcessRequest(RequestData *pRequest);
	BOOL ReConnect();
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLongTrans)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
	// Generated message map functions
	//{{AFX_MSG(CLongTrans)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	afx_msg void StartTrans(WPARAM wParam,LPARAM lParam);
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LONGTRANS_H__DCD84592_758D_4C2B_87C0_DA9C3AD39803__INCLUDED_)
